package controller

import (
	"context"
	v1 "wh-1-backend/api/v1"
	"wh-1-backend/internal/service"
)

type cIndustry struct {
}

var Industry = cIndustry{}

func (i *cIndustry) ListByPid(ctx context.Context, req *v1.IndustryListReq) (res *v1.IndustryListRes, err error) {
	list, err := service.Industry().ListByPid(ctx)
	if err != nil {
		return nil, err
	}
	res = &v1.IndustryListRes{
		List: list,
	}
	return
}
